package com.firefightingiot.firefightingiot.web.web;

import cn.hutool.json.JSONObject;
import com.firefightingiot.firefightingiot.common.base.BaseController;
import com.firefightingiot.firefightingiot.support.annotaion.Action;
import com.firefightingiot.firefightingiot.support.annotaion.At;
import com.firefightingiot.firefightingiot.web.service.DeviceRunCountService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author Yang yu
 * @version 1.0
 * @date 2020/7/27 10:02
 */
@Action
@RequestMapping(value="DeviceRunCount")
public class DeviceRunCountController extends BaseController {

    @Resource
    private DeviceRunCountService deviceRunCountService;

    @At(value = "getDeviceRunCount", method = RequestMethod.GET)
    public Map<String, Object> getDeviceRunCount(@RequestBody(required = false) JSONObject jsonParam) throws InterruptedException {
        return deviceRunCountService.deviceRunCount(jsonParam);
    }
}
